//
//  ShareView.h
//  AnProject
//
//  Created by TobyYoung on 2017/5/23.
//  Copyright © 2017年 Answern. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "ShareModel.h"
#import "WXApi.h"
#import "WXApiObject.h"

typedef void(^ShareSuccessCallbackBlock)(void);
typedef void(^LoginSuccessCallbackBlock)(NSDictionary *dict);
typedef void(^PaySuccessCallbackBlock)(void);

@interface ShareView : UIView <WXApiDelegate>

+ (ShareView *)sharedInstance;

- (BOOL)handleOpenURL:(NSURL *)url;

// 分享
- (void)showShareViewWithModel:(ShareModel *)model andCallback:(ShareSuccessCallbackBlock)callback;

// 登录
- (void)loginWithWxInVC:(UIViewController *)vc andCallback:(LoginSuccessCallbackBlock)callback;

// 支付
- (void)payWithWxDict:(NSDictionary *)dict andCallback:(PaySuccessCallbackBlock)callback;

// 取消分享框
- (void)dismissShareView;

@end
